<?php

use Illuminate\Routing\Router;
use Illuminate\Support\Facades\Route;
use Dcat\Admin\Admin;

Admin::routes();

Route::group([
    'prefix'     => config('admin.route.prefix'),
    'namespace'  => config('admin.route.namespace'),
    'middleware' => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'MemberController@index');
    $router->resource('auth/users', 'AdminUserController');
    $router->resource('members', 'MemberController');
    $router->resource('publishers', 'PublisherController');
    $router->resource('hot_articles', 'HotArticleController');
    $router->resource('hot_articles_draft', 'HotArticlesDraftController');
    $router->resource('news_articles', 'NewsArticleController');
    $router->resource('news_articles_draft', 'NewsArticlesDraftController');
    $router->post('article/generate_short_link', 'HotArticleController@generateShortLink')->name('article_generate_short_link');
    $router->resource('topics', 'TopicController');
    $router->resource('topics_draft', 'TopicsDraftController');
    $router->resource('article_comments', 'ArticleCommentController');
    $router->resource('topic_comments', 'TopicCommentController');
    $router->resource('messages', 'MessageController');
    $router->resource('configs', 'ConfigController');
    $router->any('upload/files', 'FileController@handle');
    $router->any('upload/pay_cert', 'FileController@payCert');
    $router->resource('themes', 'ThemeController');
    $router->resource('article_tags', 'ArticleTagController');
    $router->resource('hot_news_tags', 'HotNewsTagController');
    $router->resource('topic_tags', 'TopicTagController');
    $router->resource('common_word', 'CommonWordController');
    $router->resource('mini_program', 'MiniProgramController');
    $router->resource('mini_program_setting', 'MiniProgramSettingController');
    $router->resource('sms_setting', 'SmsSettingController')->only(['index', 'store']);
    $router->resource('member_sign_log', 'MemberSignLogController');
    $router->resource('member_integral_log', 'MemberIntegralLogController');
    $router->resource('member_task_log', 'MemberTaskLogController');
    $router->resource('sms_log', 'SmsLogController')->only(['index']);
    $router->resource('sms_tpl', 'SmsTplController');
    $router->resource('upload_config', 'UploadConfigController');
    $router->resource('apply', 'ApplyController')->only(['index']);
    $router->post('apply/store_module_need_vip/module/{module}/slug/{slug}', 'ApplyController@storeSlugNeedVip')->name('apply_store_module_need_vip');
    $router->resource('mini_program_tab', 'MiniProgramBottomTabController');
    $router->resource('mini_program_special', 'MiniProgramSpecialController');
    $router->resource('vip', 'VipController');
    $router->resource('member_vip_log', 'MemberVipLogController');
    $router->resource('member_vip_order', 'MemberVipOrderController');
    $router->resource('pay_log', 'PayLogController');
    $router->resource('refund_log', 'RefundLogController');

    $router->resource('diy_form', 'DiyFormController');
    $router->resource('diy_form_content', 'DiyFormContentController');
    $router->post('diy_form/generate_short_link', 'DiyFormController@generateShortLink')->name('diy_form_generate_short_link');

	$router->resource('tcmclass', 'TcmclassicController');
	$router->resource('tcmcase', 'TcmCaseDetailController');
	$router->resource('tcmtea', 'TcmTeaDetailController');
	$router->resource('tcmdoctor', 'TcmDoctorDetailController');
	$router->resource('tcmdongqipoint', 'TcmDongqipointDetailController');
	$router->resource('tcmmedicineddiet', 'TcmMedicineddietDetailController');
	$router->resource('tcmfood', 'TcmFoodDetailController');
	$router->resource('tcmprescription', 'TcmPrescriptionDetailController');
	$router->resource('tcmmedicine', 'TcmMedicineDetailController');
	$router->resource('tcmdrug', 'TcmDrugDetailController');
	$router->resource('tcmaroma', 'TcmAromaController');
	$router->resource('tcmbook', 'TcmBookController');
	$router->resource('tcmbook_chapter', 'TcmBookChapterController');

    $router->resource('mini_app_page', 'MiniAppPateController');

    $router->resource('jump_tags', 'JumpTagController');
	$router->resource('mini_main_tab', 'MiniProgramMainTabController');
	$router->resource('mini_main_nav', 'MiniProgramNavController');
	$router->resource('mini_rotation_chat', 'MiniProgramRotationChatController');
	$router->resource('mini_single_img', 'MiniProgramSingleImgController');
	$router->resource('mini_program_msg_board', 'MsgBoardController');
    $router->resource('health_note', 'HealthNoteController');
    $router->resource('health_note_comment', 'HealthNoteCommentController');

    $router->resource('course_source_class', 'CourseSourceClassController');
    $router->resource('course_source', 'CourseSourceController');
    $router->resource('course', 'CourseController');
    $router->resource('course_class', 'CourseClassController');
    $router->resource('course_comment', 'CourseCommentController');
    $router->resource('course_order', 'CourseOrderController');
});
